home *** CD-ROM | disk | FTP | other *** search
/ Click Press Kit / Click Press Kit.iso / pc / main.dxr / Internal_37_RecordSet REMOVE LATER parent.ls < prev    next >
Encoding:
Text File  |  2006-05-31  |  11.4 KB  |  362 lines

  1. property pStepframe, pMasterCount, pCurrentCount, pDownLoadsMasterCount, pDownLoadsCount, pImagesMasterCount, pImagesCount, pFlashPaperMasterCount, pFlashPaperCount, pFlashObject, pDirectorToFlashFinished, pMasterList, pmode
  2. global gRecordSet, gTracker, gMaster
  3.  
  4. on new me
  5.   pMasterList = []
  6.   pDirectorToFlashFinished = "no"
  7.   pStepframe = "none"
  8.   pmode = "none"
  9.   pMasterCount = 0
  10.   pCurrentCount = 0
  11.   pDownLoadsMasterCount = 0
  12.   pImagesMasterCount = 0
  13.   pDownLoadsCount = 0
  14.   pImagesCount = 0
  15.   pFlashPaperCount = 0
  16.   pFlashPaperMasterCount = 0
  17.   return me
  18. end
  19.  
  20. on stepFrame me
  21.   case pmode of
  22.     "none":
  23.     "storedData":
  24.       case pStepframe of
  25.         "none":
  26.           nothing()
  27.         "general":
  28.           put "general started: " & "count is: " & pCurrentCount
  29.           gRecordSet.mAddGeneralStored(gRecordSet.pCurrentCount)
  30.           pStepframe = "Sections"
  31.         "Sections":
  32.           put "Sections started: " & "count is: " & pCurrentCount
  33.           gRecordSet.mAddSuperSectionsStored(gRecordSet.pCurrentCount)
  34.           pStepframe = "DownLoads"
  35.         "DownLoads":
  36.           put "DownLoads started: " & "count is: " & pCurrentCount
  37.           pDownLoadsMasterCount = gRecordSet.pMasterList[gRecordSet.pCurrentCount][3].count
  38.           if pDownLoadsMasterCount = 0 then
  39.             pStepframe = "Images"
  40.           else
  41.             pDownLoadsCount = 1
  42.             me.mAddDownLoadsStored(pDownLoadsCount, gRecordSet.pCurrentCount)
  43.           end if
  44.         "IsDownLoadsFinished":
  45.           put "IsDownLoadsFinished started: " & "count is: " & pCurrentCount
  46.           pDownLoadsCount = pDownLoadsCount + 1
  47.           if pDownLoadsCount > pDownLoadsMasterCount then
  48.             pStepframe = "Images"
  49.           else
  50.             me.mAddDownLoadsStored(pDownLoadsCount, gRecordSet.pCurrentCount)
  51.           end if
  52.         "Images":
  53.           put "Images started: " & "count is: " & pCurrentCount
  54.           pImagesMasterCount = gRecordSet.pMasterList[gRecordSet.pCurrentCount][4].count
  55.           if pImagesMasterCount = 0 then
  56.             pStepframe = "FlashPaper"
  57.           else
  58.             pImagesCount = 1
  59.             me.mAddImagesStored(pImagesCount, gRecordSet.pCurrentCount)
  60.           end if
  61.         "IsImagesFinished":
  62.           put "IsImagesFinished started: " & "count is: " & pCurrentCount
  63.           pImagesCount = pImagesCount + 1
  64.           if pImagesCount > pImagesMasterCount then
  65.             pStepframe = "FlashPaper"
  66.           else
  67.             me.mAddImagesStored(pImagesCount, gRecordSet.pCurrentCount)
  68.           end if
  69.         "FlashPaper":
  70.           put "FlashPaper started: " & "count is: " & pCurrentCount
  71.           pFlashPaperMasterCount = gRecordSet.pMasterList[gRecordSet.pCurrentCount][5].count
  72.           if pFlashPaperMasterCount = 0 then
  73.             pStepframe = "sendColdFusion"
  74.           else
  75.             pFlashPaperCount = 1
  76.             me.mAddFlashPaperStored(pFlashPaperCount, gRecordSet.pCurrentCount)
  77.           end if
  78.         "IsFlashPaperFinished":
  79.           put "IsFlashPaperFinished started: " & "count is: " & pCurrentCount
  80.           pFlashPaperCount = pFlashPaperCount + 1
  81.           if pFlashPaperCount > pFlashPaperMasterCount then
  82.             pStepframe = "sendColdFusion"
  83.           else
  84.             me.mAddFlashPaperStored(pFlashPaperCount, gRecordSet.pCurrentCount)
  85.           end if
  86.         "sendColdFusion":
  87.           put "sendColdFusion started: " & "count is: " & pCurrentCount
  88.           gRecordSet.mSendSuperToColdFusion()
  89.           pStepframe = "wrapUp"
  90.         "wrapUp":
  91.           put "wrapUp started: " & "count is: " & pCurrentCount
  92.           pCurrentCount = pCurrentCount + 1
  93.           if pCurrentCount > pMasterCount then
  94.             pStepframe = "CompleteWrapUp"
  95.           else
  96.             pStepframe = "general"
  97.             pFlashObject.mReSetArrays()
  98.           end if
  99.         "CompleteWrapUp":
  100.           pStepframe = "none"
  101.           pmode = "none"
  102.           gTracker.mDeleteFileFromFolder()
  103.       end case
  104.     "currentData":
  105.       case pStepframe of
  106.         "none":
  107.           nothing()
  108.         "general":
  109.           put "general started"
  110.           mAddGeneral()
  111.           pStepframe = "Sections"
  112.         "Sections":
  113.           put "Sections started"
  114.           mAddSuperSections()
  115.           pStepframe = "DownLoads"
  116.         "DownLoads":
  117.           put "DownLoads started"
  118.           pDownLoadsMasterCount = gTracker.pDownLoadList.count
  119.           if pDownLoadsMasterCount = 0 then
  120.             pStepframe = "Images"
  121.           else
  122.             pDownLoadsCount = 1
  123.             me.mAddDownLoads(pDownLoadsCount)
  124.           end if
  125.         "IsDownLoadsFinished":
  126.           put "IsDownLoadsFinished started"
  127.           pDownLoadsCount = pDownLoadsCount + 1
  128.           if pDownLoadsCount > pDownLoadsMasterCount then
  129.             pStepframe = "Images"
  130.           else
  131.             me.mAddDownLoads(pDownLoadsCount)
  132.           end if
  133.         "Images":
  134.           put "Images started"
  135.           pImagesMasterCount = gTracker.pPhotoViewList.count
  136.           if pImagesMasterCount = 0 then
  137.             pStepframe = "FlashPaper"
  138.           else
  139.             pImagesCount = 1
  140.             me.mAddImages(pImagesCount)
  141.           end if
  142.         "IsImagesFinished":
  143.           put "IsImagesFinished started"
  144.           pImagesCount = pImagesCount + 1
  145.           if pImagesCount > pImagesMasterCount then
  146.             pStepframe = "FlashPaper"
  147.           else
  148.             me.mAddImages(pImagesCount)
  149.           end if
  150.         "FlashPaper":
  151.           put "FlashPaper started"
  152.           pFlashPaperMasterCount = gTracker.pFlashPaperViewList.count
  153.           if pFlashPaperMasterCount = 0 then
  154.             pStepframe = "wrapUp"
  155.           else
  156.             pFlashPaperCount = 1
  157.             me.mAddFlashPaper(pFlashPaperCount)
  158.           end if
  159.         "IsFlashPaperFinished":
  160.           put "IsFlashPaperFinished started"
  161.           pFlashPaperCount = pFlashPaperCount + 1
  162.           if pFlashPaperCount > pFlashPaperMasterCount then
  163.             pStepframe = "wrapUp"
  164.           else
  165.             me.mAddFlashPaper(pFlashPaperCount)
  166.           end if
  167.         "wrapUp":
  168.           put "wrapUp started"
  169.           gRecordSet.mSendSuperToColdFusion()
  170.           pStepframe = "none"
  171.           pmode = "none"
  172.           pDirectorToFlashFinished = "yes"
  173.       end case
  174.   end case
  175. end
  176.  
  177. on mProcessCurrentRecordSet me
  178.   pFlashObject.mReSetArrays()
  179.   pDirectorToFlashFinished = "no"
  180.   pMasterCount = 1
  181.   pmode = "currentData"
  182.   pStepframe = "general"
  183.   mDeleteActor(me)
  184.   mAddActor(me)
  185. end
  186.  
  187. on mProcessStoredRecordSet me
  188.   gRecordSet.pFlashObject.mReSetArrays()
  189.   pDirectorToFlashFinished = "no"
  190.   gRecordSet.pMasterCount = gRecordSet.pMasterList.count
  191.   pmode = "storedData"
  192.   pCurrentCount = 1
  193.   pStepframe = "general"
  194.   mDeleteActor(me)
  195.   mAddActor(me)
  196. end
  197.  
  198. on mOneRecordSet me
  199.   pMasterCount = 1
  200. end
  201.  
  202. on mMoreRecordSets me, vCount
  203.   pMasterCount = vCount
  204. end
  205.  
  206. on mAddGeneral me
  207.   a = gTracker.pGeneralList.sessionID
  208.   b = gMaster.pGeneralSettings.presskitid
  209.   c = gTracker.pGeneralList.startDateTime
  210.   d = gTracker.pGeneralList.endDateTime
  211.   e = gTracker.pGeneralList.screenheight
  212.   f = gTracker.pGeneralList.screenwidth
  213.   g = gTracker.pGeneralList.screendepth
  214.   h = gTracker.pGeneralList.platform
  215.   pFlashObject.mAddGeneral(a, b, c, d, e, f, g, h)
  216. end
  217.  
  218. on mAddGeneralStored me, vListNumber
  219.   a = gRecordSet.pMasterList[vListNumber][1].sessionID
  220.   b = gRecordSet.pMasterList[vListNumber][1].pkID
  221.   c = gRecordSet.pMasterList[vListNumber][1].startDateTime
  222.   d = gRecordSet.pMasterList[vListNumber][1].endDateTime
  223.   e = gRecordSet.pMasterList[vListNumber][1].screenheight
  224.   f = gRecordSet.pMasterList[vListNumber][1].screenwidth
  225.   g = gRecordSet.pMasterList[vListNumber][1].screendepth
  226.   h = gRecordSet.pMasterList[vListNumber][1].platform
  227.   pFlashObject.mAddGeneral(a, b, c, d, e, f, g, h)
  228. end
  229.  
  230. on mAddSections me
  231.   a = gTracker.pSectionList.main
  232.   b = gTracker.pSectionList.first
  233.   c = gTracker.pSectionList.gallery
  234.   d = gTracker.pSectionList.slideshow
  235.   e = gTracker.pSectionList.trailer
  236.   f = gTracker.pSectionList.poster
  237.   g = gTracker.pSectionList.logos
  238.   h = gTracker.pSectionList.notes
  239.   i = gTracker.pSectionList.summary
  240.   j = gTracker.pSectionList.flashpaper
  241.   k = gTracker.pSectionList.website
  242.   pFlashObject.mAddSection(a, b, c, d, e, f, g, h, i, j, k)
  243. end
  244.  
  245. on pushValuesIntoArray me, asprite, aArray, aList
  246.   tArray = asprite.getVariable(aArray, 0)
  247.   tCount = aList.count
  248.   repeat with aIndex = 1 to tCount
  249.     tArray.push(aList[aIndex])
  250.   end repeat
  251. end
  252.  
  253. on pushValuesIntoArray2 me, asprite, aArray, aList
  254.   tArray = asprite.getVariable(aArray, 0)
  255.   tCount = aList.count
  256.   repeat with aIndex = 1 to tCount
  257.     tProp = string(aList.getPropAt(aIndex))
  258.     tValue = aList[aIndex]
  259.     tArray[tProp] = tValue
  260.   end repeat
  261. end
  262.  
  263. on mAddSuperSections me
  264.   repeat with x = 1 to gTracker.pSectionList.count
  265.     a = getPropAt(gTracker.pSectionList, x)
  266.     b = getAt(gTracker.pSectionList, x)
  267.     pFlashObject.mAddSuperSection(a, b)
  268.   end repeat
  269. end
  270.  
  271. on mAddSectionsStored me, vListNumber
  272.   a = gRecordSet.pMasterList[vListNumber][2].main
  273.   b = gRecordSet.pMasterList[vListNumber][2].first
  274.   c = gRecordSet.pMasterList[vListNumber][2].gallery
  275.   d = gRecordSet.pMasterList[vListNumber][2].slideshow
  276.   e = gRecordSet.pMasterList[vListNumber][2].trailer
  277.   f = gRecordSet.pMasterList[vListNumber][2].poster
  278.   g = gRecordSet.pMasterList[vListNumber][2].logos
  279.   h = gRecordSet.pMasterList[vListNumber][2].notes
  280.   i = gRecordSet.pMasterList[vListNumber][2].summary
  281.   j = gRecordSet.pMasterList[vListNumber][2].flashpaper
  282.   k = gRecordSet.pMasterList[vListNumber][2].website
  283.   pFlashObject.mAddSection(a, b, c, d, e, f, g, h, i, j, k)
  284. end
  285.  
  286. on mAddSuperSectionsStored me, vListNumber
  287.   vTempList1 = []
  288.   repeat with x = 1 to gRecordSet.pMasterList[vListNumber][2].count
  289.     add(vTempList1, string(getPropAt(gRecordSet.pMasterList[vListNumber][2], x)))
  290.   end repeat
  291.   aa = string(vTempList1)
  292.   a = mReplaceText(aa, QUOTE, EMPTY)
  293.   vTempList2 = []
  294.   repeat with x = 1 to gRecordSet.pMasterList[vListNumber][2].count
  295.     add(vTempList2, gRecordSet.pMasterList[vListNumber][2][x])
  296.   end repeat
  297.   bb = string(vTempList2)
  298.   b = mReplaceText(bb, QUOTE, EMPTY)
  299.   repeat with x = 1 to vTempList1.count
  300.     a = vTempList1[x]
  301.     b = vTempList2[x]
  302.     pFlashObject.mAddSuperSection(a, b)
  303.   end repeat
  304. end
  305.  
  306. on mAddDownLoads me, vCount
  307.   a = gTracker.pDownLoadList[vCount][1]
  308.   b = gTracker.pDownLoadList[vCount][2]
  309.   pFlashObject.mAddDownLoads(a, b)
  310.   pStepframe = "IsDownLoadsFinished"
  311. end
  312.  
  313. on mAddDownLoadsStored me, vCount, vListNumber
  314.   a = gRecordSet.pMasterList[vListNumber][3][vCount][1]
  315.   b = gRecordSet.pMasterList[vListNumber][3][vCount][2]
  316.   pFlashObject.mAddDownLoads(a, b)
  317.   pStepframe = "IsDownLoadsFinished"
  318. end
  319.  
  320. on mAddImages me, vCount
  321.   a = gTracker.pPhotoViewList[vCount]
  322.   pFlashObject.mAddImages(a)
  323.   pStepframe = "IsImagesFinished"
  324. end
  325.  
  326. on mAddImagesStored me, vCount, vListNumber
  327.   a = gRecordSet.pMasterList[vListNumber][4][vCount]
  328.   pFlashObject.mAddImages(a)
  329.   pStepframe = "IsImagesFinished"
  330. end
  331.  
  332. on mAddFlashPaper me, vCount
  333.   a = gTracker.pFlashPaperViewList[vCount]
  334.   pFlashObject.mAddFlashPaper(a)
  335.   pStepframe = "IsFlashPaperFinished"
  336. end
  337.  
  338. on mAddFlashPaperStored me, vCount, vListNumber
  339.   a = gRecordSet.pMasterList[vListNumber][5][vCount]
  340.   pFlashObject.mAddFlashPaper(a)
  341.   pStepframe = "IsFlashPaperFinished"
  342. end
  343.  
  344. on mSendToColdFusion me
  345.   pFlashObject.mSendToColdFusion()
  346. end
  347.  
  348. on mSendSuperToColdFusion me
  349.   pFlashObject.mSendSuperToColdFusion()
  350. end
  351.  
  352. on mAddActor me
  353.   add(the actorList, me)
  354. end
  355.  
  356. on mDeleteActor me
  357.   where = getOne(the actorList, me)
  358.   if where > 0 then
  359.     deleteAt(the actorList, where)
  360.   end if
  361. end
  362.